import java.util.Scanner;

class stringToInteger{
    String str;
    int temp;


    public void IntegerToArr(String str){
        this.str = str;
        int[] IntegerArr = new int[str.length()];
        this.temp = Integer.parseInt(str);
        int i = 0;
        while (temp != 0){
            int k = temp % 10;
            IntegerArr[i] = k;
            temp /= 10;
            i++;
        }
        int max = 0;
        for (int j = 0; j < IntegerArr.length; j++) {
            if (IntegerArr[j] >= max && IntegerArr[j] % 2 != 0 ){
                max = IntegerArr[j];
            }
        }
        if (max == 0){
            System.out.println("");
            return;
        }
        String ret = String.valueOf(max);
//        String ret2 = max + "";
        System.out.println(ret);
//        System.out.println(ret2);
    }
}
public class test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        stringToInteger stringToInteger = new stringToInteger();
        stringToInteger.IntegerToArr(str);
    }
}
